﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MathNet.Numerics.LinearAlgebra.Generic;

namespace Marvin.Tests
{
    static class TestHelpers
    {
        private const double Epsilon = 0.000001;

        internal static bool DeepSequenceEquals(double[][] expected, Matrix<double> actual)
        {
            for (int row = 0; row < expected.Length; row++)
            {
                for (int column = 0; column < expected[0].Length; column++)
                {
                    if (Math.Abs(expected[row][column] - actual[row, column]) > Epsilon)
                        return false; 
                }
            }
            return true; 
        }
    }
}
